Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

uninitialized constant PackagesController::RiCal

#44

i am getting error while trying to create ics file please review my code whats wrong with this
uninitialized constant PackagesController::RiCal
is there need ti include or some thing else?

class PackagesController < ApplicationController
def i_cal pack = Administration::MerchantPackage.find(params[:id]) loc = pack.offering.merchant.address.to_s + pack.offering.merchant.city.to_s cal =RiCal.Calendar do event do description pack.subtitle dtstart DateTime.parse(pack.start_date.strftime('%m/%d/%Y %H:%M:%S')) dtend DateTime.parse(pack.end_date.strftime('%m/%d/%Y %H:%M:%S')) location loc add_attendee current_user.email rescue '' alarm do description "Segment 51" end end end respond_to do |format| format.ics { send_data(cal.export, :filename=>"Calendar.ics", :disposition=>"inline; filename=Calendar.ics", :type=>"text/calendar")} end end
end

Reported by shoaib iqbal · February 29th, 2016 @ 07:46 AM

State: new
Milestone: none
Assigned to: Rick DeNatale Rick DeNatale

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.